/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chatserver;

/**
 *
 * @author NAMQUYUIT
 */
public class Account {

    private String username;
    private String password;
    
    public Account(String username, String password) {
        this.username = username;
        this.password = password;
    }
    
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }    

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof Account) {
            Account tmpAccount = (Account)obj;
            if (this.username.equals(tmpAccount.getUsername()) 
                    && this.password.equals(tmpAccount.getPassword())) {
                return true;
            }
        }
        
        return false;
    }
}
